package codejam11

object filereader {

/*
 object myInt {
	  def unapply(s : String) : Option[Int] = try {
		  Some(s.toInt)
	  } catch {
	  case _ : java.lang.NumberFormatException => None
	  }
}
 
  def getValue(s: String): Int = s match {
  	case "inf" => Integer.MAX_VALUE 
  	case myInt(x) => x
  	case _ => error("not a number")
}

*/
  
  def main(args: Array[String]) {
	  //-----------------------------------------------------------
	  // read data from the specific path
	  val lines = io.Source.fromFile("D:/Program Files/Eclipse/ninja.hatoriz@hatoriz/Scala_test01/input/test_magicka.txt","utf-8").getLines
	  // First line of input data
	  val firstline = lines.next
	  println("Number of test case -> " + firstline)
	  
	  val l = lines.next.split(" ").map(_.mkString)
	  
	  
	  0.until(l.length).foreach
	  {
	    i=>
	    println(l(i))
	  }
	  
	  
	  
	  
  
  
  
  
  
  
  }
  }